<% title_tag t(".Integrations"), @repository.name %>

<%= render "menu" %>
<div class="col-12 col-md-9 float-left">
  <h2 class="sub-title"><%= t(".JIRA") %></h2>
  <%= form_with(model: @jira_service, url: jira_user_repository_settings_path(@user, @repository), local: true, method: :post) do |form| %>
    <%= render "/shared/error_messages", target: @jira_service %>
    <div class="form-group">
      <div class="form-check">
        <%= form.check_box :active, checked: @jira_service.active?, class: "form-check-input form-check-submit" %>
        <%= form.label :active, t(".Active"), class: "form-check-label font-weight-bold" %>
        <div class="form-text mt-1">
          <%= t(".Enable to collect Jira Issue form docs") %>
        </div>
      </div>
    </div>
    <div class="form-group">
      <%= form.label :site, class: "control-label" %>
      <%= form.text_field :site, class: "form-control", placeholder: t(".Use a JIRA site URL") %>
    </div>
    <div class="form-group">
      <%= form.label :username, class: "control-label" %>
      <%= form.text_field :username, class: "form-control", placeholder: t(".Use a username for JIRA") %>
    </div>
    <div class="form-group">
      <%= form.label :password, class: "control-label" %>
      <%= password_field_tag "jira_service[password]", nil, class: "form-control", placeholder: t(".Use a password for JIRA"), readonly: true, onfocus: "this.removeAttribute('readonly');" %>
    </div>
    <div class="actions mb-section">
      <%= form.submit t(".Update"), class: "btn btn-primary btn-submit" %>
    </div>
  <% end %>
</div>
